import java.util.Scanner;
import java.util.*;
public class test1{


    public static void main(String[] args) {
        //完成输入
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for(int i = 0;i < n; i++) {
            arr[i] = sc.nextInt();
        }
        int count = 0;
        for(int i = 0;i < n;i++) {
            for(int j = i+1;j < n;j++) {
                if(arr[i] < arr[j]) {
                    if(arr[i] >= arr[j] * 0.9) {
                        count++;
                    }
                }else {
                    if(arr[i] <= arr[j] * 0.9) {
                        count++;
                    }
                }

            }
        }
    }
}